package com.spica.platform.common.constant;

import cn.hutool.core.util.StrUtil;

/**
 * 全局公共常量
 */
public interface CommonConstant {
	/**
	 * 项目名称
	 */
	String PROJECT_KEY = "ocp";


	String TOKEN = "token" ;
	/**
	 * response返回结果
	 */
	String RESPONSE_RTN_COD = "rtnCod";

	/**
	 * 默认时区
	 */
	String DEFAULT_TIME_ZONE = "Asia/Shanghai";

	/**
	 * 统一的日期时间格式
	 */
	String DATE_TIME_FORMAT_PATTERN = "yyyy-MM-dd HH:mm:ss";

	/**
	 * 统一的日期格式
	 */
	String DATE_FORMAT_PATTERN = "yyyy-MM-dd";

	/**
	 * 统一的时间格式
	 */
	String TIME_FORMAT_PATTERN = "HH:mm:ss";

	/**
	 * 幂等操作
	 */
	String RMAP_CACHE_KEY = CommonConstant.PROJECT_KEY + StrUtil.COLON + "idempotent";

	/**
	 * 提交令牌的缓存key
	 */
	String SERVICE_SUBMIT_TOKEN_KEY = "%:submit:%s:%s";

	/**
	 * 租户id参数
	 */
	String TENANT_ID_PARAM = "tenantId";
	/**
	 * 负载均衡策略-版本号 信息头
	 */
	String O_C_P_VERSION = "o-c-p-version";

	/**
	 * token请求头名称
	 */
	String TOKEN_HEADER = "Authorization";

	String BEARER_TYPE = "Bearer";

	/**
	 * 注册中心元数据 版本号
	 */
	String METADATA_VERSION = "version";

	String LOCK_KEY_PREFIX = "LOCK_KEY";
	/**
	 * 响应码标识
	 */
	String STATUS ="rtnCod";

	/**
	 * 失败标记
	 */
	Integer FAIL = 1;

	String BASIC_ = "Basic ";

	/**
	 * The access token issued by the authorization server. This value is REQUIRED.
	 */
	String ACCESS_TOKEN = "access_token";

	/**
	 * 人脸识别分组
	 */
	String GROUP = "common" ;

	/**
	 * 菜单
	 */
	Integer MENU = 1;

	/**
	 * 空白字符
	 */
	String BLANK = "";

	/**
	 * 权限
	 */
	Integer PERMISSION = 2;

	String DEF_USER_PASSWORD = "123456";

	String RESPONSE_STATUS = "status" ;
	/**
	 * 负载均衡策略-偏向性 ip:port
	 */
	String INSTANCE_INFO ="instance" ;

	/**
	 * 灰度网关
	 */
	String GRAY_LB = "grayLb";
	/**
	 * hash网关
	 */
	String HASH_LB = "iphash";
	/**
	 * 成功标记
	 */
	Integer SUCCESS = 0;
	/**
	 * 编码
	 */
	String UTF8 = "UTF-8";
	/**
	 * 权重key
	 */
	String WEIGHT_KEY = "weight";

	/**
	 * sso后端登录验证key
	 */
	String SSO_LOGIN_USER = "sso:login_user:";

	/**
	 * websocket前缀
	 */
	String WEBSOCKET_PREFIX = "WEBSOCKET_";
}
